<?php
header('Content-Type:text/html;Charset=UTF-8');
session_start();

if(isset($_SESSION['user'])){

}else {
	die('<h3>登录信息不完整</h3><a href="/index.php">返回重新登录</a>');
};


@$id = $_REQUEST['id'];

require 'lib/db.php';

@$flag = dbDelete("delete from cart where entryId=:id",array('id'=>$id));

$message="";

if ($flag==true){
	$message=('商品删除成功！');
}else {
	$message=('商品删除失败！');
}


?>
<!DOCTYPE html>
<html>
   <head>
      <title>SuperMarket</title>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
      <script src="bootstrap/js/jquery-1.11.1.min.js"></script>
      <script src="bootstrap/js/bootstrap.min.js"></script>
      <!--[if lt IE 9]>
         <script src="js/html5shiv.js"></script>
         <script src="js/respond.min.js"></script>
      <![endif]-->
   </head>
   <style>
   #color{color:red}
   .size{width:350px;height:100px}
   </style>
<body>
   
   <div class="row">
   	<div class="col-xs-4 col-xs-offset-4 size">
   		<div class="modal-content">
   			<div class="modal-header">
				<div class="modal-title">
				<h3 id="color">提示</h3>
				</div>			
			</div>
				<div class="modal-body">
					<?php echo $message;?>
				</div>
				<div class="modal-footer">
						<a href="Adddesk.php" class="btn btn-primary">知道了</a>
				</div>
   		</div>
   	</div>
   </div>
   
</body>
   </html>
   

